package com.leji.song.util;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

public class ActivityStackControlUtil {

	private static List<Activity> activityList = new ArrayList<Activity>();

	public static void remove(Activity activity) {

		activityList.remove(activity);

	}

	public static void add(Activity activity) {

		activityList.add(activity);

	}

	public static void finishProgram() {

        for (int i = 0;  i < activityList.size(); i++) {

            activityList.get(i).finish();

        }

		android.os.Process.killProcess(android.os.Process.myPid());

	}

}
